<!--https://www.w3cschool.cn/article/17593792.html-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>进度</title>


</head>
<body>

<!--<progress id="progress" value="0" max="100"></progress>-->
<!--<button class="button" onclick="load(50)">下载</button>-->
<!--<script type="text/javascript">-->
<!--    function load(n){-->
<!--        if (n==0) {alert("下载完成")};-->
<!--        var progress=document.getElementById("progress");-->
<!--        n1=n-1;-->
<!--        // 当task=0时，进度条在最左，从0开始-->
<!--        task=100-n1;-->
<!--        progress.value=task;-->
<!--        setTimeout("load("+n1+")",100);-->
<!--    }-->

<script src='../static/js/jquery-3.6.0.min.js'></script>
<script type="text/javascript">

    // function showmsg(inner){
    //     msgdiv = document.getElementById('msg')
    //     msgdiv.innerHTML = inner
    // }


    (function() {
        username = '{{username}}';
        password = '{{password}}';
        $.ajax({
            url: '/check_in',
            type: 'post',
            data: {username: username, password: password},
            success: function (res) {  //HttpResponse 返回的值
                obj=$.parseJSON(res)  ////用于将符合标准格式的的JSON字符串转为与之对应的JavaScript对象。
                console.log(obj)
                alert(obj.msg);//弹框显示返回内容

                // let msgDom = document.querySelector('.msg')
            }
        })
    })(window)
</script>


<!--<div class="msg"></div>-->
</script>

</body>

</html>